package no18.javaio;

import java.io.BufferedInputStream;
import java.io.DataInputStream;
import java.io.FileInputStream;
import java.io.IOException;

/**
 * 读取二进制流
 * 
 * @author gao
 * 
 */
public class FormattedMemoryInput {
	private final static String FILE_NAME = "D:/work/project/complex/complex.thinkinjava/src/main/java/no18/javaio/test.txt";

	public static void main(String[] args) throws IOException {
		DataInputStream in = new DataInputStream(new BufferedInputStream(
				new FileInputStream(FILE_NAME)));
		while (in.available() != 0) {
			System.out.print((char) in.readByte());
		}
		in.close();
	}
}
